package com.huzz.util.desin.adapter;


import com.huzz.util.desin.adapter.cn.UKPlug;
import com.huzz.util.desin.adapter.uk.CNSocket;

/***
 * 适配器模式
 * 适配器
 */
public class UKToCNAdapter implements CNSocket {
    private UKPlug ukPlug;

    public UKToCNAdapter(UKPlug ukPlug) {
        this.ukPlug = ukPlug;
    }

    @Override
    public void insertCNPlug() {
        System.out.println("Using adapter to convert UK plug to CN plug.");
        ukPlug.insert();
    }
}
